<?php

namespace app\common\service\order\order_status\items;

//待支付
use app\model\CouponOrder;

class OrderStatusWaitPay extends OrderStatusBase
{
    public static function handle(CouponOrder $couponOrder, $next)
    {

        if ($couponOrder->serv_type != PRODUCT_COUPON_SERV && $couponOrder->type != CouponOrder::TYPE_COUPON_SELF_EMPLOYED) {
            return $next($couponOrder);
        }

        if ($couponOrder->status == CouponOrder::C_STATUS_NO_SUBMIT && $couponOrder->pay_status == CouponOrder::C_PAY_STATUS_NO) {
            $couponOrder->params['return_status'] = self::getReturnStatus(self::WAIT, '待付款'); //其实是已结算了
        }

        return $next($couponOrder);
    }
}